import 'package:flutter/material.dart';

import 'base_page.dart';
import 'base_state.dart';

/// 混入类，抽取页面公共部分
mixin BasicPageMixin<Page extends BasePage> on BaseState<Page> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(screenName()),
      ),
      body: Container(
        color: Colors.amber,
        child: body(),
      ),
      floatingActionButton: fab(),
    );
  }

  Widget body();

  Widget fab() => Container();
}
